/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package MetricsRetriever;

import MetricsRetriever.RetrieverComponents.GCParser;
import MetricsRetriever.RetrieverComponents.SFParser;
import DataStructures.*;

/**
 *
 * @author Manuel
 */
public abstract class RetrieverFactory{


    public static RetrieverFactory getInstance(String link) {
        if(link == null)
            return null;
        if(link.contains("sourceforge.net"))
            return (new ObjectiveRetrieverFactory(new SFParser(),link));
        else if (link.contains("code.google.com"))
            return (new ObjectiveRetrieverFactory(new GCParser(),link));
        return null;
    }

    public abstract Retriever getRetriever();

    protected abstract void composeRetriever();
    


}
